home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1997 May / PC Shareware 1997-05.iso / gry / kungfu / kfk.exe / KFKLVL2.DXR / 00015_ COUNTERS SCRIPT.ls < prev    next >
Encoding:
Text File  |  1997-02-16  |  1.0 KB  |  48 lines

  1. global gHealth, gScore, Obj_ID
  2.  
  3. on initCounters
  4.   if (gHealth < 1) and (gScore < 1) then
  5.     set gHealth to 0
  6.     set gScore to 0
  7.     set the text of cast "score" to "0"
  8.   else
  9.     adjustScoreMeter()
  10.     adjustHealthMeter()
  11.     updateStage()
  12.   end if
  13. end
  14.  
  15. on adjustScoreMeter
  16.   set the text of cast "score" to string(gScore)
  17.   if gScore >= 1500 then
  18.     play movie "kfkLIN3.DIR"
  19.   end if
  20. end
  21.  
  22. on adjustHealthMeter
  23.   if (gHealth > -11) and (gHealth < 11) then
  24.     set the castNum of sprite 7 to the number of cast "tao 0" + gHealth
  25.   end if
  26.   updateStage()
  27.   if gHealth = -10 then
  28.     doGameOver()
  29.   end if
  30.   if gHealth > 10 then
  31.     set gHealth to 10
  32.     updateStage()
  33.   end if
  34.   if (gHealth = -3) or (gHealth = -6) or (gHealth = -9) then
  35.     launchHealthGoody()
  36.   end if
  37. end
  38.  
  39. on doGameOver
  40.   set the keyDownScript to EMPTY
  41.   set the keyUpScript to EMPTY
  42.   set the timeoutScript to EMPTY
  43.   addProp(nastyList, Obj_ID, birth(script "paint spot Kim Death parent", Obj_ID))
  44.   advancenastyIDcounter()
  45.   set gKimPos to #DEAD
  46.   set gHealth to -15
  47. end
  48.